<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>History API</title>
    <link rel="stylesheet" href="./style.css">
    <link rel="stylesheet" href="./modern.css">
    <link href="./modern-responsive.css" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>
    <script>

    function errorHandler(e) {
      var msg = '';

      switch (e.code) {
        case FileError.QUOTA_EXCEEDED_ERR:
          msg = 'QUOTA_EXCEEDED_ERR';
          break;
        case FileError.NOT_FOUND_ERR:
          msg = 'NOT_FOUND_ERR';
          break;
        case FileError.SECURITY_ERR:
          msg = 'SECURITY_ERR';
          break;
        case FileError.INVALID_MODIFICATION_ERR:
          msg = 'INVALID_MODIFICATION_ERR';
          break;
        case FileError.INVALID_STATE_ERR:
          msg = 'INVALID_STATE_ERR';
          break;
        default:
          msg = 'Unknown Error';
          break;
      };

      console.log('Error: ' + msg);
    }


    function onInitFs(fs) {

      fs.root.getFile('log.txt', {create: true}, function(fileEntry) {

        // Create a FileWriter object for our FileEntry (log.txt).
        fileEntry.createWriter(function(fileWriter) {

          fileWriter.onwriteend = function(e) {
            console.log('Write completed.');
          };

          fileWriter.onerror = function(e) {
            console.log('Write failed: ' + e.toString());
          };

          // Create a new Blob and write it to log.txt.
          var blob = new Blob(['Bonjour Monsieur Le Professeur.'], {type: 'text/plain'});

          fileWriter.write(blob);

        }, errorHandler);

      }, errorHandler);

    }


      window.requestFileSystem(window.TEMPORARY, 1*1024*1024 /*1mo*/, onInitFs, errorHandler);
    </script>
 
  </head>
  <body>
    <header>
      <div id="imglogo"></div>
      <div id="titrelogo">IOBH</div>
    </header>
        <div id="contenair" style="height: auto; display:block;width:100px;margin:auto;padding-top:20px;">

    </div>
  <footer>
    © 2012 Honoré & Giovanetti.
  </footer>
  </body>
</html>